﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MYData.Entity.DomainModels;

namespace MYData.Entity.DTO.ApiEntity.Input
{
    /// <summary>
    /// 科目经费报销输入dto
    /// </summary>
    public class BudgetBaseInfoInput_Dto
    {
        /// <summary>
        ///项目基本信息(外键）
        /// </summary>
        [Display(Name = "项目基本信息(外键）")]
        [MaxLength(64)]
        [Column(TypeName = "nvarchar(64)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string projecId { get; set; }

        /// <summary>
        ///报销科目ID(外键)
        /// </summary>
        [Display(Name = "报销科目ID(外键)")]
        [MaxLength(64)]
        [Column(TypeName = "nvarchar(64)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string subjectId { get; set; }

        /// <summary>
        ///科目报销信息
        /// </summary>
        [Display(Name = "科目报销信息")]
        [Column(TypeName = "nvarchar(max)")]
        [Editable(true)]
        public string subjectCostingInfo { get; set; }

        /// <summary>
        ///科目报销页面数据
        /// </summary>
        [Display(Name = "科目报销页面数据")]
        [Column(TypeName = "nvarchar(max)")]
        [Editable(true)]
        public string applyPageData { get; set; }

        /// <summary>
        ///配套经费(万元)
        /// </summary>
        [Display(Name = "配套经费(万元)")]
        [DisplayFormat(DataFormatString = "10,2")]
        [Column(TypeName = "decimal")]
        [Editable(true)]
        public decimal? SupportMoney { get; set; }

        /// <summary>
        ///专项经费(万元)
        /// </summary>
        [Display(Name = "专项经费(万元)")]
        [DisplayFormat(DataFormatString = "10,2")]
        [Column(TypeName = "decimal")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public decimal SpecialMoney { get; set; }


        ///// <summary>
        ///// 科目模板信息
        ///// </summary>
        //public List<BudegtTemplateInput_Dto>? fundingitems { get; set; }

        ///// <summary>
        ///// 附件上传dto
        ///// </summary>
        //public List<FileUploadInput_Dto>? File { get; set; }

    }

    public class UpdateExpenseInfoDto: BudgetBaseInfoInput_Dto
    {
        /// <summary>
        ///经费报销ID主键
        /// </summary>
        [Key]
        [Display(Name = "经费报销ID主键")]
        [MaxLength(64)]
        [Column(TypeName = "uniqueidentifier")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string id { get; set; }
    }

}
